/*
 * utils/minmax.hh - Templated minimum and maximum functions.
 * Copyright (C) 2007  Mikhail Vorozhtsov
 * See the LICENSE section of the README file for details.
 */

/* $Id$ */

#ifndef HEADER_UTILS_MINMAX_HH
#define HEADER_UTILS_MINMAX_HH

START_NAMESPACE (utils)

template <typename T>
INLINE
static T
min (T a, T b)
{
  if (a <= b)
    return a;
  return b;
}

template <typename T>
INLINE
static T
max (T a, T b)
{
  if (a <= b)
    return b;
  return a;
}

END_NAMESPACE

#endif /* HEADER_UTILS_MINMAX_HH */

